@echo off
echo Excel to CSV Converter - 使用GoLand Python3编译
echo ================================================

set PYTHON_PATH=C:\Users\lvan\AppData\Local\Programs\Python\Python313\python.exe

echo.
echo 正在检查Python3...
"%PYTHON_PATH%" --version
if %errorlevel% neq 0 (
    echo 错误: 未找到Python3
    pause
    exit /b 1
)

echo.
echo 正在安装依赖包...
"%PYTHON_PATH%" -m pip install openpyxl xlrd pyinstaller

echo.
echo 正在编译为exe文件...
"%PYTHON_PATH%" -m PyInstaller --onefile --windowed --name "ExcelToCSVConverter" excel_to_csv_converter.py

echo.
echo 编译完成！exe文件位于 dist 文件夹中
echo 文件名: ExcelToCSVConverter.exe
echo.
pause
